package de.arndt_panzer.bensgallery;

import java.lang.ref.WeakReference;

import android.widget.ImageView;

public class BitmapWorkerParameter {
	
	private String							mImagePath;
	private int								mReqHeight;
	private int								mReqWidth;
	private boolean							mCache;
	private final WeakReference<ImageView>	mView;
	
	public BitmapWorkerParameter(String imagePath,
									ImageView view,
									int reqWidth,
									int reqHeight,
									boolean cache) {
		if (view != null)
			mView = new WeakReference<ImageView>(view);
		else
			mView = null;
		mImagePath = imagePath;
		mReqHeight = reqHeight;
		mReqWidth = reqWidth;
		mCache = cache;
	}
	
	public String getPath() {
		return mImagePath;
	}
	
	public int getReqHeight() {
		return mReqHeight;
	}
	
	public int getReqWidth() {
		return mReqWidth;
	}
	
	public boolean getCache() {
		return mCache;
	}
	
	public ImageView getImageView() {
		return mView != null ? mView.get() : null;
	}
}
